<?php
defined('IN_PHPCMS') or exit('No permission resources.'); 

$session_storage = 'session_'.pc_base::load_config('system','session_storage');
pc_base::load_sys_class($session_storage);
$isok = 0;
$code = trim($_POST['code']);
if(!isset($code) || empty($code)) $isok = 0;
if ($_SESSION['code'] == strtolower($code)) {
	$isok = 1;
	//$_SESSION['code'] = '';
}else{
	$isok = 0;
}
echo $isok;